#!/usr/bin/env node

const Koa = require('koa'),
      task = require('./lib/task.js'),
      logger = require('koa-logger'),
      log = console.log;
const app = new Koa();

app.use(logger()); //M-logger

app.use(async(ctx,next)=>{   //M-hello
  ctx.body = 'hello koa! task cost:' + await task() + 'ms';

});

app.listen(8080);
